import 'package:firstdemo/widget/WidgetIcons.dart';
import 'package:firstdemo/widget/widgetText.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'WidgetImage.dart';

class WidgetMain extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
        appBar: new AppBar(title: new Text("组件")),
        body: Padding(
          padding: EdgeInsets.all(12),
          child: Wrap(
            spacing: 10,
            runSpacing: 10,
            children: <Widget>[
              RaisedButton(
                  child: Text(
                    "Text",
                    style: TextStyle(fontSize: 22),
                  ),
                  textTheme: ButtonTextTheme.accent,
                  onPressed: () {
                    Navigator.push(
                        context,
                        new CupertinoPageRoute(
                            builder: (context) => new widgetText()));
                  }),
              RaisedButton(
                  child: Text(
                    "Icon",
                    style: TextStyle(fontSize: 22),
                  ),
                  textTheme: ButtonTextTheme.accent,
                  onPressed: () {
                    Navigator.push(
                        context,
                        new CupertinoPageRoute(
                            builder: (context) => new WidgetIcons()));
                  }),
              RaisedButton(
                  child: Text(
                    "Image",
                    style: TextStyle(fontSize: 22),
                  ),
                  textTheme: ButtonTextTheme.accent,
                  onPressed: () {
                    Navigator.push(
                        context,
                        new CupertinoPageRoute(
                            builder: (context) => new WidgetImage()));
                  }),
            ],
          ),
        ));
  }
}
